package com.dtb.trade.dao.mongodb.second;

import com.dtb.trade.entity.mongodb.second.SecondBlock;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.List;

/**
 * @Author:ChengJian
 * @Description:
 * @Date: Created in 下午3:30 2018/8/15
 */
public interface SecondRepository extends MongoRepository<SecondBlock,String> {

    SecondBlock findBlockByIndex(long index);


    @Query("{'index':{'$gte':?0}}")
    List<SecondBlock> findSecondBlockByIndex(int index);
}
